package com.koi.system.controller;

import com.koi.system.config.common.AjaxResult;
import com.koi.system.config.common.AssertUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 测试控制器
 * </p>
 *
 * @author 大猫
 * @since 2022-07-27
 */
@Api(tags = "测试接口")
@RestController
@RequestMapping("/system/user")
public class TestController {

    @ApiOperation("hello")
    @GetMapping("/hello")
    public AjaxResult hello(){
        return AjaxResult.success("操作成功","HelloWorld");
    }

    @ApiOperation("test1")
    @GetMapping("/test1")
    public AjaxResult test1(){
        AssertUtil.isTrue(true,"哈哈哈，异常抛出成功");
        return AjaxResult.success("操作成功","HelloWorld");
    }

}
